<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html >
<html>
<head>
    <meta charset="UTF-8">
    <base href="./">
    <link rel="stylesheet" href="libs/css/edit.css">
</head>
<body>

<form action="User" method="post">
    <c:if test="${info==null}">
        <input type="hidden" name="cmd" value="insert">
    </c:if>
    <c:if test="${info!=null}">
        <input type="hidden" name="cmd" value="update">
        <input type="hidden" name="id" value="${info.id}">
    </c:if>

    <div class="inputview">

		<span class="inputspan">
			<label class="inputtext">名称:</label>
			<input class="inputinput" name="name" value="${info.name}"/>
		</span>
        <span class="inputspan">
			<label class="inputtext">电话:</label>
			<input class="inputinput" name="tel" value="${info.tel}"/>
		</span>

        <span class="inputspan">
		<label class="inputtext">权限:</label>
		<select name="power" class="inputselect">
			<c:forEach items="${powers}" var="s" varStatus="v">
                <c:if test="${info.status!=v.index}">
                    <option value="${v.index}" >${s}</option>
                </c:if>
                <c:if test="${v.status=info.power}">
                    <option value="${v.index}" selected="selected">${s}</option>
                </c:if>
            </c:forEach>
		</select>
		</span>
    </div>

    <span class="inputspan">
		<label class="inputtext">状态:</label> 
		<select name="status" class="inputselect">
			<c:forEach items="${statuss}" var="a" varStatus="v">
                <c:if test="${v.index==info.status}">
                    <option value="${v.index}" selected="selected">${a}</option>
                </c:if>
                <c:if test="${v.index!=info.status}">
                    <option value="${v.index}">${a}</option>
                </c:if>
            </c:forEach>
		</select>
		</span>

    <div class="inputbtpanel">
        <button class="seachbt1" type="submit">保存</button>
    </div>
</form>

</body>
</html>